#include <iostream>
#include <string>
using namespace std;
int main()
{

	string s1("Hello world");

	cout << "s1:" << s1 << endl;
	cout << "s1.size():" << s1.size() << endl;
	cout << "s1.length():" << s1.length() << endl;
	cout << "s1.capacity():" << s1.capacity() << endl;
	cout << "s1.max_size() :" << s1.max_size() << endl;

	string s;
	size_t sz = s.capacity();
	cout << "capacity change: " << sz << endl;
	cout << "making s grow: \n";
	for (int i = 0; i < 100; i++)
	{
		s.push_back('c');
		if (sz != s.capacity())
		{
			sz = s.capacity();
			cout << "capacity change: " << sz << '\n';
		}
	}

	return 0;
}